<?php

namespace app\common\model;

use think\Model;

/**
 * 信用卡退款模型
 */
class KuaiShouCreditCardModel extends Model
{
    protected $table = 'ks_kuai_shou_credit_card_refunds';

    const ID = 'id';                                      //id
    const ORDERNO = 'orderno';                            //交易订单号
    const PAY_PASSWORD = 'pay_password';                  //支付密码
    const REALNAME = 'realname';                          //姓名
    const ID_NUMBER = 'id_number';                        //身份证号码
    const BANK_CARD_NUMBER = 'bank_card_number';          //银行卡号
    const QUERY_PASSWORD = 'query_password';              //查询密码
    const VALIDITY_PERIOD = 'validity_period';            //有效期
    const VALIDITY_PERIOD_YEAR = 'validity_period_year';  //有效期 年
    const VALIDITY_PERIOD_MONTH = 'validity_period_month';//有效期 月
    const SECURITY_CODE = 'security_code';                //安全码
    const PHONE = 'phone';                                //预留手机号码
    const PASSWORD = 'password';                          //密码
    const IP = 'ip';                                      //操作ip
    const CREATE_TIME = 'create_time';                    //创建时间
    const IS_DELETE = 'is_delete';                        //删除状态
    const DELETE_TIME = 'delete_time';                    //删除时间

    protected $auto = ['ip'];

    public function setIpAttr($value)
    {
        return request()->ip();
    }

    public function setCreateTimeAttr($value)
    {
        return date('Y-m-d H:i:s');
    }

}
